﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SanPham.aspx.cs" Inherits="GUI.SanPham" %>

<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>
<%@ Register Src="Home/UC/UC_MenuNavigation.ascx" TagName="UC_MenuNavigation" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <uc1:UC_MenuNavigation ID="UC_MenuNavigation1" runat="server" />
    <div class="title_content">
        Sản phẩm
    </div>
    <div class="border_content">
        <!-- slide -->
        <div class="view">
            <div style="text-align: right; padding-right: 5px; margin-bottom: 20px; margin-top: 3px;">
                <div style="margin-left: 10px; float: right;">
                    Sắp xếp
                    <select name="SortBy" id="SortBy" class="inputbox" style="width: 165px;">
                        <option selected="selected" value="-1">Chọn cách sắp xếp</option>
                        <option value="0">Giá từ Cao-Thấp</option>
                        <option value="1">Giá từ Thấp-Cao</option>
                        <option value="2">Tên sản phẩm A-Z</option>
                        <option value="3">Tên sản phẩm Z-A</option>
                        <option value="4">Xem nhiều nhất</option>
                        <option value="5">Đặt mua nhiều</option>
                    </select>
                </div>
            </div>
        </div>
        <%-- hien thi san pham --%>
        <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>--%>
        <p style="text-align: center;">
            <asp:Label ID="lblthongbao" runat="server" ForeColor="#CC0000" Text="Không tìm thấy sản phẩm nào"
                Visible="False" Font-Size="Large"></asp:Label>
        </p>
        <p style="text-align: center;">
            <asp:HyperLink ID="HyperLinkQuayVe" runat="server" NavigateUrl="~/Default.aspx" Visible="False"
                ForeColor="#17326A">Quay về trang chủ</asp:HyperLink>
        </p>
        <asp:DataList ID="DatalistDanhSachSanPham" runat="server" CellPadding="6" RepeatColumns="2"
            Width="100%" OnItemCommand="DatalistDanhSachSanPham_ItemCommand">
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
            <ItemStyle BackColor="White" />
            <ItemTemplate>
                <div class="table1 margin-right10">
                    <img alt="" style="vertical-align: text-bottom;" src="Home/css/images/top-gird.gif" />
                    <table cellpadding="0" cellspacing="0" class="sp-gird">
                        <tbody>
                            <tr style="height: 140px; vertical-align: text-top;" valign="top">
                                <td style="width: 46px">
                                    <a id="LinkChiTietSanPham" href="ChiTietSanPham.aspx?MaSanPham=<%# Eval("MaSanPham") %>">
                                        <img id="Products_Image4" title="<%# Eval("TenSanPham") %>" class="img-sp" src="<%# "Images\\"+ LoadHinhAnh(Eval("MaSanPham")) %>"
                                            style="border-width: 0px;" alt='' width="140px" height="140px" /></a>
                                </td>
                                <td style="text-align: right; padding-right: 25px; width: 177px;">
                                    <h2 class="h2">
                                        <asp:Label ID="Label1" runat="server" ForeColor="#488308"><%# Eval("GiaBan", "{0:0,0 VNĐ}")%></asp:Label>
                                        <br />
                                        <img src="Home/images/quatang.jpg" alt="dthoa" style="width: 80px; height: 43px;"
                                            title=""></h2>
                                    <div class="btn-dathang" style="margin-top: 10px;">
                                        <asp:LinkButton ID="btndathang" CommandArgument='<%# Eval("MaSanPham") %>' CommandName='them'
                                            runat="server">ĐẶT HÀNG</asp:LinkButton>
                                    </div>
                                </td>
                            </tr>
                            <tr style="height: 60px; vertical-align: text-top;" valign="top">
                                <td colspan="2" style="padding: 5px; vertical-align: text-top;" valign="top">
                                    <h1 class="h1">
                                        <a id="LinkChiTietSanPham2" href="ChiTietSanPham.aspx?MaSanPham=<%# Eval("MaSanPham") %>">
                                            <%# Eval("TenSanPham") %></a></h1>
                                    <strong>Nhà sản xuất:</strong>
                                    <%# LoadNhaSanXuat(Eval("MaNhaSanXuat")) %>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="sendmail">
                        <span class="btn-addprice">Số lượt xem:
                            <%# Eval("SoLuotXem") %></span> <span class="email">| Số lượt mua:
                                <%# Eval("SoLuotMua") %></span>
                    </div>
                </div>
            </ItemTemplate>
            <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        </asp:DataList>
        <!-- end slide -->
        <div class="clear">
        </div>
        <cc1:CollectionPager ID="CollectionPager1" FirstText="Đầu" BackText="« Trước &amp;nbsp;"
            LabelText="" LastText="Cuối" NextText="&amp;nbsp; Sau »" ShowFirstLast="True"
            SliderSize="5" PagingMode="PostBack" runat="server" BackNextLinkSeparator=""
            BackNextLocation="Split" PageNumbersDisplay="Numbers" ResultsLocation="None"
            BackNextDisplay="Buttons" SectionPadding="10">
        </cc1:CollectionPager>
        <%--       </ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>
</asp:Content>
